<?php
/**
 * Created by 项目.
 * User: xuguopeng
 * Date: 5/24/21
 * Time: 9:39 PM
 */

namespace app\api\validate\product;


use LinCmsTp5\validate\BaseValidate;

class CheckProduct extends BaseValidate
{
    protected $rule = [
        'name' => 'require|max:50',
        'img_id' => 'require|isPositiveInteger',
        'store_id' => 'require|isPositiveInteger',
        'original_price' => 'require|float',
        'present_price' => 'require|float',
        'new_user_price' => 'require|float',
        'invite_cash' => 'float',
        'group_invite_cash' => 'float',
        'new_user_invite_cash' => 'float',
        'start_time' => 'require',
        'end_time' => 'require',
    ];


    protected $message = [
        'name' => '请输入产品名称且长度大于50',
        'img_id' => '请上传产品图片',
        'store_id' => '请选择店面信息',
        'original_price' => '请输入原价',
        'present_price' => '请输入现价',
        'new_user_price' => '请输入新用户下单价格',
        'invite_cash' => '请输入分享者返现金额',
        'group_invite_cash' => '请输入团长，团员分享返现金额',
        'new_user_invite_cash' => '新顾客分享返现金额',
        'start_time' => '请输入开始使用时间',
        'end_time' => '请输入结束使用时间',
    ];
}